In a machine tool on which an NC unit (numerical control unit) is mounted, a workpiece is machined into a desired product shape by executing the NC program. To create the NC creation program for creating the NC machining program, recently, an automatic programming technique using a microcomputer referred to as an automatic programming apparatus has been frequently used.
The primitive automatic programming apparatuses were not connected to the CAD data, and hence, it was necessary to perform programming, while watching the machining shape in a drawing or the like. However, recently, some techniques relating to the automatic programming apparatus that creates the NC machining program by the CAD data have been proposed.
For example, in Japanese Patent Application Laid-open No. 2002-189510, feature data of a machined product is extracted from the CAD data to set a machining process and a machining area for each machining process, material data and a machining model for each machining process are created, the created machining process data and machining model data are stored, tool path data is created based on the machining process data, workpiece data, machining model data, tool data, and cutting condition data, to create virtual workpiece-shape data after completing the respective processes, as well as creating fabrication information based on the created process data, workpiece data, tool path data, and virtual workpiece-shape data.
In Japanese Patent Application Laid-open No. 2002-268718, when a machining path for machining a workpiece based on a three-dimensional CAD data of a part is created, machining information for all portions to be machined in a shape indicated by the three-dimensional CAD data is extracted, the extracted machining information is edited to determine a machining process, and the machining path is created based on the determined machining process.
In such type of automatic programming apparatus, it is desired to automatically select an optimum workpiece corresponding to a product easily.
In Japanese Patent Application Laid-open No. H10-207523, some workpiece-shapes expressed by a three-dimensional solid model are stored in a preparation workpiece-shape database, and workpiece-shape data specified by an operator is taken out from the preparation workpiece-shape database, deformed to a size instructed by the operator, and stored in the workpiece-shape database.
In Japanese Patent Application Laid-open No. H10-207523, however, since the operator selects the workpiece from the workpiece-shape data, long time is required for selecting the work, thereby deteriorating the working efficiency.
The present invention has been achieved in order to solve the above problems, and it is therefore an object of the invention to provide an automatic programming method and device that can automatically select optimum workpiece data from the workpiece database, thereby enabling efficient programming operation.